// ========================= tcpserver.h =========================
#ifndef TCPSERVER_H
#define TCPSERVER_H

#ifdef __cplusplus
extern "C"
{
#endif

#include <stdint.h>

    // Start the TCP server on port 7070 and spawn its 3 threads.
    // Returns 0 on success, <0 on failure (e.g., port in use).
    int tcpserver_start(void);

    // Stop all TCP threads and close sockets.
    void tcpserver_stop(void);

#ifdef __cplusplus
}
#endif

#endif // TCPSERVER_H